home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
pluginy Firefox
/
60
/
60.xpi
/
chrome
/
webdeveloper.jar
/
content
/
webdeveloper
/
dialogs
/
outline_elements.js
< prev
next >
Wrap
Text File
|
2009-06-30
|
2KB
|
52 lines
// Cancels the outline elements
function webdeveloper_cancelOutlineElements()
{
window.opener.document.getElementById("webdeveloper-outline-custom-elements-menu").checked = false;
window.close();
}
// Initializes the outline elements dialog
function webdeveloper_initializeOutlineElements()
{
var color = null;
var element = null;
// Loop through the possible custom elements
for(var i = 1; i <= 5; i++)
{
color = "webdeveloper.custom." + i + ".color";
element = "webdeveloper.custom." + i + ".element";
// If the color is set
if(webdeveloper_isPreferenceSet(color))
{
document.getElementById(color).color = webdeveloper_getStringPreference(color, true);
}
// If the element is set
if(webdeveloper_isPreferenceSet(element))
{
document.getElementById(element).value = webdeveloper_getStringPreference(element, true);
}
}
}
// Saves the list of colors and elements to outline
function webdeveloper_saveOutlineElements()
{
var color = null;
var element = null;
// Loop through the possible custom elements
for(var i = 1; i <= 5; i++)
{
color = "webdeveloper.custom." + i + ".color";
element = "webdeveloper.custom." + i + ".element";
webdeveloper_setStringPreference(color, document.getElementById(color).color);
webdeveloper_setStringPreference(element, document.getElementById(element).value.trim());
}
window.arguments[0].push(true);
}